package com.changgou.goods.dao;

import com.changgou.goods.pojo.Brand;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface BrandMapper extends Mapper<Brand> {

    @Select("SELECT t1.* from tb_brand t1 JOIN tb_category_brand t2 on t1.id=t2.brand_id join tb_category t3 on t3.id=t2.category_id where t3.name=#{cateName}")
    List<Brand> findBrandByCategory(String cateName);
}
